function infoUpdate(){
	compId = $('#Comp option:selected').val();
	sIntroduction=$('#sIntroduction option:selected').text();
	eIntroduction=$('#eIntroduction option:selected').text();
	sPile = $('#sPile option:selected').text();
	sHole = $('#sHole option:selected').text();
	ePile = $('#ePile option:selected').text();
	eHole = $('#eHole option:selected').text();

	/*if(compId=="" || message=="" || startTime=="" || endTime=="" || PNum=="" || mArea=="" || mMashine=="" || Pcharge=="" || PhoneCall==""
		|| Arrangement=="" || sPile=="" || sHole=="" || ePile=="" || eHole==""){
		alert("请填写完整信息！");
	}else{*/
//	document.getElementById("formID").action="pipeLineUpdate";
	/* $.ajax({                              
			url : "pipeLineUpdate",
			cache : false,
			data:$('#formID1').serialize(),
			success : function(result) {
				
			}
	 });*/
	 document.getElementById("formID1").action="pipeLineUpdate";
     $("#formID1").submit();
//	}
}

function setPTWS(obj){
	if(obj.value!==""){
		$.ajax({
			url : "loadCIBySelect?compId="+obj.value,
			cache : false,
			success : function(result) {
				   compId = result.id;
				   compName = result.name;
				   pt_id = result.pt_id;
				   sws_id = result.sws_id;
				   ews_id = result.ews_id;
				   
				   setArrangement(compId);
					setSPile(compId);
					setEPile(compId);
			}
		});
	}
}

function setArrangement(id){
	document.getElementById("pt_id").value=pt_id;
	document.getElementById("sws_id").value=sws_id;
	document.getElementById("ews_id").value=ews_id;
		$.ajax({
			url : "loadArrangeSelect?id="+id,
			cache : false,
			success : function(result) {
				var Arrange = $("#Arrangement")[0];
				var len = Arrange.length;
				for(var i=1;i<len;i++){
					Arrange.removeChild(Arrange[1]); 
				}
			  for(var i=0;i<result.length;i++){ 
			      document.getElementById("Arrangement").options.add(new Option(result[i].name,result[i].id));
			  }
			}
		});
}

function setSPile(id){
	$.ajax({
		url : "loadSPileSelect?id="+id,
		cache : false,
		success : function(result) {
			var pile = $("#sPile")[0];
			var len = pile.length;
			for(var i=1;i<len;i++){
				pile.removeChild(pile[1]); 
			}
		  for(var i=0;i<result.length;i++){ 
		      document.getElementById("sPile").options.add(new Option(result[i].name,result[i].id));
		  }
		}
	});
}

function setEPile(id){
	$.ajax({
		url : "loadEPileSelect?id="+id,
		cache : false,
		success : function(result) {
			var pile = $("#ePile")[0];
			var len = pile.length;
			for(var i=1;i<len;i++){
				pile.removeChild(pile[1]); 
			}
		  for(var i=0;i<result.length;i++){
		      document.getElementById("ePile").options.add(new Option(result[i].name,result[i].id));
		  }
		}
	});
}